"""Docstring shouldn't be empty."""

from pandac.PandaModules import Vec3

class Island(object):
    """Standard Island class."""

    id = 0

    def __init__(self, name, model, pos=Vec3(0, 0, 0), hpr=Vec3(0, 0, 0)):
        """Arguments:
        name -- string: island name (free to choose)
        model -- string: model to load at init (path to egg)
        """

        self.name = name

        self.__node = render.attachNewNode("island" + str(Island.id))
        if model is None:
            pass
        else:
            self.node().loadModel(model)

        self.node().setPos(pos)
        self.node().setHpr(hpr)

    def node(self):
        """returns the model node"""
        return self.__node
